public class Demo4 {

    public static void main(String[] args){
        Object obj = "Hello";
        if(obj instanceof String s){
            System.out.println(s);
        }
    }
}
